﻿#parse("/user/admin/inc/top.htm")
#macro(orderPic $type)
  #if ($orderField.equals($type)) 
  	<img src="/images/system/ico/${orderType}.gif">
  #end
#end
<div class="clearfix"></div>
<div class="MainPannel">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td height="38" align="center"><table width="98%" height="34" border="0" cellpadding="0" cellspacing="0">
          <tr>
              <td width="40" align="right"><img src="/images/list.gif" width="32" height="32" /></td>
              <td class="titletxt">文章列表</td>
          </tr>
        </table></td>
    </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr><td>
  <script language="JavaScript" src="/js/forbidNew.js" type="text/JavaScript"></script>
  <script language="JavaScript" src="/js/ajaxSupport.js" type="text/JavaScript"></script>
  <script language="JavaScript">
function doShow(){
	var id=ListForm.cid.value;
	if(id==""){
		alert("请选择要查看的数据！");
		return false;
	}
	window.open("/blogNewsDoc.do?parameter=show&cid="+id,"","");
}
function choiceDir(){
	var x=event.screenX;
	var y=event.screenY;
	var result=window.showModalDialog('/choice.do?parameter=choiceDir','Choice',"dialogLeft:"+x+"px;dialogTop:"+y+"px;dialogWidth:195px;dialogHeight:400px;help:no;status:no");
	return result;
}
function doSetTodayHead()
{
	ListForm.parameter.value="setTodayHead";
	ListForm.submit();
}
function doSetElite()
{
	ListForm.parameter.value="manageSetElite";
	ListForm.submit();
}
function doSearch()
{
	ListForm.parameter.value="search";
	ListForm.submit();
}
</script>
<form id="ListForm" name="ListForm" method="post" action="/blogNewsDoc.do">
<input type="hidden" name="parameter" value="" />
<input type="hidden" name="cid" value="$!cid" />
<input type="hidden" name="mulitCid" value="$!mulitCid" />
<input type="hidden" name="page" value="$!page" />
<input name="orderField" type="hidden" value="$!orderField" />
<input name="orderType" type="hidden" value="$!orderType" />
		<div style="margin:8px">
      <table width="100%" border="0" cellpadding="1" cellspacing="1" bgcolor="#CBD9D9" class="BorderLine">
          <tr>
          <td colspan="7" height="24" colspan="0" bgcolor="#F8FCF8">
            <table cellpadding="0" cellspacing="0" border="0">
              <tr>
                <td>标题：
                  <input name="queryTitle" type="text" size="15" value="$!queryTitle"></td>
                <td>分类：
                  <select name="parentsn" id="parentsn">
                    <option value="">请选择</option>
                    
$!TagUtil.options($dirService.queryBlogNewsDir($currentUser.userName,1,15).result,"cid","title",$parentsn)			 
                   	
                  </select></td>
                <td><input type="button" name="SubmitSearch" value="查询" onClick="doSearch()" /></td>
              </tr>
            </table>
        </td>
        </tr>
        <tr>
          <td width="16" height="24" align="center" class="title1" style="cursor: pointer;"><input type="checkbox" onclick="selectAll(cids,this.checked);" /></td>
          <td align="center" style="cursor: pointer;" onClick="doSort('title')" class="title1" title="点击按标题排序">标 题#orderPic("title")</td>
          <td width="80" align="center" style="cursor: pointer;" onClick="doSort('source')" class="title1" title="点击按来源排序">来 源#orderPic("source")</td>
          <td width="80" align="center" nowrap style="cursor: pointer;" onClick="doSort('inputuser')" class="title1" title="点击按作者排序">作 者#orderPic("inputuser")</td>
          <td width="80" align="center" style="cursor: pointer;" onClick="doSort('parentId')" class="title1" title="点击按分类排序">分 类#orderPic("parentId")</td>
          <td width="120" align="center" nowrap style="cursor: pointer;" onClick="doSort('displaytime')" class="title1" title="点击按发布日期排序">发布日期#orderPic("displaytime")</td>
          <td width="190" align="center" class="title1">操 作</td>
        </tr>
        #foreach( $info in $list)
        <tr bgcolor="#F8FCF8" onMouseOver="this.className='MouseOver';" onMouseOut="this.className='MouseOut'">
          <td height="23"><input type="checkbox" name="cids" value="$!info.cid"></td>
          <td>
          	<a href="javascript:selectRow('$!info.cid');doShow();">$!info.title</a>
          </td>
          <td align="center"><a href="#">$!info.source</a></td>
          <td align="center">$!info.inputuser</td>
          <td>#if($info.dirsn=="")
            默认分类
            #else
            $!dirService.getBlogNewsDir($info.dirsn).getTitle()
            #end </td>
          <td align="center">$CommUtil.formatDate('yyyy-MM-dd H:m',$!info.displaytime)</td>
          <td align="center">
          	<a href="javascript:selectRow('$!info.cid');doShow();"><img src="/images/system/view.png" width="16" height="16" border="0" align="absmiddle"/></a>
          	<a href="javascript:selectRow('$!info.cid');doShow();">点击查看</a>
            <a href="javascript:selectRow('$!info.cid');doEdit();"><img src="/images/system/edit.png" width="16" height="16" border="0" align="absmiddle"/></a>
            <a href="javascript:selectRow('$!info.cid');doEdit();">编辑</a>

            <a href="javascript:selectRow('$!info.cid');doDel();"><img src="/images/system/delete.png" width="16" height="16" border="0" align="absmiddle"/></a>
            <a href="javascript:selectRow('$!info.cid');doDel();">删除</a>
           </td>
        </tr>
        #end
      </table>
			</div>
</form>
</td>
</tr>
</table>
<table width="100%" height="24" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td align="center" valign="middle">第<strong> #if($!page>0)
          $!page
          #else
          1
          #end </strong>页 共<strong>#if($!pages>0)
          $!pages
          #else
          1
          #end</strong>页<span class="txt1">[共<b>$!rows</b>条记录]</span> 　　
          #if($gotoPageHTML=="")
          #else
          分页：$!gotoPageHTML　
          #end </td>
      </tr>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td align="left" valign="middle"><table height="50" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td width="50" align="left" valign="middle">&nbsp;</td>
            <td width="100" align="center" valign="middle"><input type="hidden" name="SubmitElite" value="推荐文件" onClick="doSetElite()" /></td>
            <td width="100" align="center" valign="middle"><input type="hidden" name="SubmitTop" value="今日头条" onClick="doSetTodayHead()" /></td>
            <td width="25" align="center" valign="middle"><input type="button" name="SubmitDel" value="删除" onClick="doDel()"/></td>
          </tr>
        </table></td>
    </tr>
  </table>
	<div class="clearfix"></div>
</div>
<div class="clearfix"></div>
#parse("/user/admin/inc/bottom.htm")
</body>
</html>
#if ($msg)
<script>
alert('$!msg');</script>
#end